home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
psgui130.zip
/
PGUI.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-01-01
|
17KB
|
436 lines
{
╔══════════════════╗
║ Pure Power ║
║ VGA Graphical ║
║ User Interface ║
║ Rev. 1.30 ║
╚══════════════════╝
}
{$F+} {$O-} {$A+} {$G+}
{$V-} {$B-} {$X-} {$N+} {$E+}
{$I FINAL.PAS}
{$IFDEF FINAL}
{$I-} {$R-}
{$D-} {$L-} {$S-}
{$ENDIF}
Unit PGUI;
{ ╔════════════════════════════════════════════════════════════════════════╗}
{ ║ ║}
{ ║ Pure Power VGA Object Orientated Graphical User Interface ║}
{ ║ ║}
{ ║ This unit controls Super VGA modes and mouse. The unit requires ║}
{ ║ Turbo Pascal Version 6 and Genius Mouse Driver Version 9.06 or later. ║}
{ ║ ║}
{ ║ Written by : Michael Gallias ║}
{ ║ Last Update : 16 December 1992 ║}
{ ║ ║}
{ ╚════════════════════════════════════════════════════════════════════════╝}
Interface
Uses Graph,CRT,DOS,Dirs,Strings,KeyDef,Icons,PGUIMDef,PGUIMSE,PGUIBMSE;
Type {From MouseDef}
BGIMouseShapePtr = ^BGIMouseShape;
BGIMouseShape = Record
Picture :Pointer;
Mask :Pointer;
XHot :Integer;
YHot :Integer;
End;
STDMouseShapePtr = ^STDMouseShape;
STDMouseShape = Record
Picture :Array[1..32] of Byte;
Mask :Array[1..32] of Byte;
XHot :Integer;
YHot :Integer;
End;
Type
HideOrShow = (Hidden,Visible);
OutLineSave = Record {Screen Save when dragging}
Size1, {graphics box}
Size2 :Word;
Data :Array[1..4] Of Pointer;
End;
ButtonListPtr = ^ButtonList; {Buttons to click on}
ButtonList = Record
X1,Y1,X2,Y2:Word; {Screen Co-ordinate}
Thickness :Word; {How thick it is}
Background :Word; {Background it lies on}
Special :Boolean; {Keyboard Keys}
Key :Char; {Keyboard Character}
Picture :Pointer; {If it has a Picture}
Name :String[11]; {If it has a Name}
Number :Word; {It's own Unique Number}
Next :ButtonListPtr; {Next Button in Linked List}
End;
ButtonChain = Object
Total :Word;
Procedure Init;
Function Position :Word;
Function Number :Word;
Procedure GotoPosition (Here:Word);
Procedure GotoNumber (ButtonNumber:Word);
Procedure DrawUp (ButtonNumber:Word);
Procedure DrawDown (ButtonNumber:Word);
Procedure Add (X1, Y1, X2, Y2:Word;
Thickness, Background:Word;
Picture:Pointer; Name:String;
Special:Boolean; Key:Char);
Procedure Move (X, Y:Integer;
ButtonNumber:Word);
Procedure MoveAll (X, Y:Integer);
Procedure Create (X1, Y1, X2, Y2:Word;
Thickness, Background:Word;
Picture:Pointer; Name:String;
Special:Boolean; Key:Char);
Procedure WaitForClick (Var X, Y:Word;Var MouseButtons:Byte;
Var Held,Doubled,Special:Boolean;
Var Key:Char);
Procedure KillAll;
Procedure KillFrom;
Procedure KillOne;
Private
Root :Pointer;
Buttons :ButtonListPtr;
Function NewButtonNumber:Word;
End;
MouseFunctions = Object
Init :MouseProc_Init;
Show :MouseProc_Show;
Hide :MouseProc_Hide;
SetSpeed :MouseProc_SetSpeed;
SetXY :MouseProc_SetXY;
SetBounds :MouseProc_SetBounds;
SetShape :MouseProc_SetShape;
GetPresses :MouseProc_GetPresses;
GetXY :MouseProc_GetXY;
GetStatus :MouseProc_GetStatus;
GetClick :MouseProc_GetClick;
Function ComputerSpeed:LongInt;
Function Active :Boolean;
End;
GraphicWindow = Object
HdrButtonNum, {Button Numbers}
VSlideButtonNum, {The Little Button}
VSlideBarButtonNum, {The Bar as a Button}
VSlideButtonUpNum,
VSlideButtonDownNum,
HSlideButtonNum,
HSlideBarButtonNum,
HSlideButtonLeftNum,
HSlideButtonRightNum,
CloseButtonNum :Word;
Buttons :ButtonChain; {The window's buttons}
VSlideBarCurPos:LongInt;
HSlideBarCurPos:LongInt;
Status :HideOrShow; {Visible or Not}
KeepBack :Boolean; {Background Saved or Not}
Thickness :Byte; {Box Outline}
Pattern, {Pascal Pattern Number}
FillColor, {Pattern Colour}
HdrPattern, {Heading Background Pattern}
HdrFillColor, {Heading Pattern Colour}
HdrFrg, {Header Text Forg}
BoxFrg, {Box Colour}
BoxBck, {Box Backgound OutLine}
Size, {Memory Required for Save}
X1,Y1, {Location on Screen}
X2,Y2 :Word;
Header :String; {Heading Text}
HdrFmt :TextFormats; {Heading Format}
VSlideBarPat,
VSlideBarClr,
VSlideButtonPos:Word;
VSlideBarMaxPos:LongInt;
HSlideBarPat,
HSlideBarClr,
HSlideButtonPos:Word;
HSlideBarMaxPos:LongInt;
Procedu